//
//  ResetPasswordView.m
//  Comma
//
//  Created by dlios on 15-1-14.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "ResetPasswordView.h"

@interface ResetPasswordView ()<UIAlertViewDelegate>

@end

@implementation ResetPasswordView

//- (void)changeControlType
//{
//    // 设置视图的大小
//    self.frame = CGRectMake(0, SCREEN_HEIGHT * 0.6 - 88, SCREEN_WIDTH, SCREEN_HEIGHT * 0.4 + 88);
//    if (iPhone6Plus) {
//        self.frame = CGRectMake(0, SCREEN_HEIGHT * 0.6 - 132, SCREEN_WIDTH, SCREEN_HEIGHT * 0.4 + 132);
//    }
//    self.auTextField = [[UITextField alloc] initWithFrame:CGRectMake(self.downTextField.frame.origin.x, self.downTextField.frame.origin.y + self.downTextField.frame.size.height, self.downTextField.frame.size.width, self.downTextField.frame.size.height)];
//    [self addSubview:_auTextField];
//    [self.auTextField setPlaceholder:@"验证码"];
//    [self.downButton setFrame:CGRectMake(self.downButton.frame.origin.x, self.downButton.frame.origin.y + self.downButton.frame.size.height, self.downButton.frame.size.width, self.downButton.frame.size.height)];
//    // 设置忘记密码Button的frame
//    self.centerButton.frame = CGRectMake(SCREEN_WIDTH - 80 + SCREEN_WIDTH, 88, 65, 44);
//    // 修改输入手机号Field的长度
//    self.upTextField.frame = CGRectMake(16 + SCREEN_WIDTH, 44, SCREEN_WIDTH - 110, 44);
//    // 修改输入密码Field的长度
//    self.centerTextField.frame = CGRectMake(16 + SCREEN_WIDTH, 88, SCREEN_WIDTH - 110, 44);
//    self.centerTextField.secureTextEntry = YES;
//    
//    [self createLine];
//}

- (void)createLine
{
    self.upLine = [[UIView alloc] initWithFrame:CGRectMake(SCREEN_WIDTH, 88, SCREEN_WIDTH, 0.5)];
    _upLine.backgroundColor = LINEERGRAY;
    [self addSubview:_upLine];
    self.midLine = [[UIView alloc] initWithFrame:CGRectMake(SCREEN_WIDTH, 132, SCREEN_WIDTH, 0.5)];
    _midLine.backgroundColor = LINEERGRAY;
    [self addSubview:_midLine];
    self.downLine = [[UIView alloc] initWithFrame:CGRectMake(SCREEN_WIDTH, 176, SCREEN_WIDTH, 0.5)];
    _downLine.backgroundColor = LINEERGRAY;
    [self addSubview:_downLine];
    
}

- (void)addCustomUI
{
    // 设置视图的大小
    self.frame = CGRectMake(0, SCREEN_HEIGHT * 0.6 - 88, SCREEN_WIDTH, SCREEN_HEIGHT * 0.4 + 88);
    if (iPhone6Plus) {
        self.frame = CGRectMake(0, SCREEN_HEIGHT * 0.6 - 132, SCREEN_WIDTH, SCREEN_HEIGHT * 0.4 + 132);
    }
    [self createLine];
    self.auTextField = [[UITextField alloc] initWithFrame:CGRectMake(self.downTextField.frame.origin.x, self.downTextField.frame.origin.y + self.downTextField.frame.size.height, self.downTextField.frame.size.width, self.downTextField.frame.size.height)];
    [_auTextField setTextColor:TEXTERGRAY];
    [_auTextField setFont:BOLDENGLISH_FONT(14.0)];
    [self addSubview:_auTextField];
    [self.auTextField setPlaceholder:@"验证码"];
    [self.centerButton setFrame:CGRectMake(SCREEN_WIDTH - 41 + SCREEN_WIDTH, 100, 25, 16)];
    [self.centerDownButton setFrame:CGRectMake(SCREEN_WIDTH - 41 + SCREEN_WIDTH, 200, 25, 16)];
    self.downButton.frame = CGRectMake(SCREEN_WIDTH - 105 + SCREEN_WIDTH, 132, 83, 44);
    [self.centerButton.titleLabel setFont:BOLDENGLISH_FONT(16.0)];
//    // 设置忘记密码Button的frame
//    self.centerButton.frame = CGRectMake(SCREEN_WIDTH - 80 + SCREEN_WIDTH, 88, 65, 44);
//    // 修改输入手机号Field的长度
//    self.upTextField.frame = CGRectMake(16 + SCREEN_WIDTH, 44, SCREEN_WIDTH - 110, 44);
//    // 修改输入密码Field的长度
//    self.centerTextField.frame = CGRectMake(16 + SCREEN_WIDTH, 88, SCREEN_WIDTH - 110, 44);
//    self.centerTextField.secureTextEntry = YES;
//    
//    [self createLine];
//    [self addSubview:_backView];
//    self.resetLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 140, SCREEN_WIDTH, 44)];
//    [_resetLabel setText:@"重置密码"];
//    [_resetLabel setTextAlignment:NSTextAlignmentCenter];
//    [_resetLabel setFont:[UIFont systemFontOfSize:40]];
//    [_resetLabel setTextColor:TEXTERGRAY];
//    [self addSubview:resetLabel];
//
////    self.upTextField.frame = CGRectMake(16, 356,  SCREEN_WIDTH - 96, 44);
////    [self.upTextField setFont:[UIFont fontWithName:@"Helvetica-Bold" size:14.0f]];
//    self.mobileField = [[UITextField alloc] initWithFrame:CGRectMake(16, 268, SCREEN_WIDTH - 32, 44)];
//    [self.mobileField setPlaceholder:@"手机号"];
//    [self.mobileField setDelegate:self];
//    [self.backView addSubview:_mobileField];
//    
//    self.passWordField = [[UITextField alloc] initWithFrame:CGRectMake(16, 312, SCREEN_WIDTH - 32, 44)];
//    [self.passWordField setDelegate:self];
//    [self.passWordField setPlaceholder:@"新密码"];
//    [self.passWordField setSecureTextEntry:YES];
//    [self.backView addSubview:_passWordField];
//    
//    self.authButton = [UIButton buttonWithType:UIButtonTypeSystem];
//    [_authButton setFrame:CGRectMake(SCREEN_WIDTH - 100, 400, 100, 44)];
//    [_authButton setTitle:@"发送验证码 >" forState:UIControlStateNormal];
//    [_authButton setTitleColor:TEXTGREENCOLOR forState:UIControlStateNormal];
//    [self.backView addSubview:_authButton];
//    [self.downTextField setFrame:CGRectMake(self.downTextField.frame.origin.x, self.downTextField.frame.origin.y, self.downTextField.frame.size.width - 100, 44)];
//    
//    self.coverLabel = [[UILabel alloc] init];
//    [_coverLabel setTextColor:TEXTGREENCOLOR];
//    [_coverLabel setBackgroundColor:[UIColor whiteColor]];
//    [_coverLabel setFont:[UIFont systemFontOfSize:15]];
//    [self.backView addSubview:_coverLabel];
//    [self.upTextField setSecureTextEntry:YES];
}
@end
